<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="../css/Own_Advise.css">
    <title>Report</title>
    <script src="../js/jquery-3.4.1.min.js"></script>
</head>
<body>
<div id="container">
    <div id="content1">
        <div id="content2">
            <p>建议功能：</p>
            <p>您的联系方式：</p>
        </div>
        <div id="content3">
            <input type="text" class="input1" id="funtion" placeholder="建议功能" value="">
            <input type="text" class="input1" id="phone" placeholder="联系方式" value="">
        </div>
        <div id="content4">
            <p id="p">建议内容：</p>
            <textarea class="input2" id="content">请在此处填写您的建议</textarea>
            <input type="button" class="input0" onclick="submit2()" value="确定">
        </div>
    </div>
</div>

<script type="text/javascript">
    function submit2() {
        var message = JSON.parse(sessionStorage.getItem("head_message"));
        var funtion = document.getElementById('funtion').value;
        var phone = document.getElementById('phone').value;
        var content = document.getElementById('content').value;

        var data= {"Uid":message.Uid, "Funtion":funtion, "Phone":phone, "Content":content};
        $.post("/submit2", data, function (result) {
            if (result == true)
            {
                alert("提交成功");
                location.reload();
            }else
            {
                alert("提交失败");
            }
        })
    }
</script>

</body>
</html>